# 排除目录
EXCLUDE_DIRS := include

# 显示深度为1的子目录
SUBDIRS := $(shell find . -maxdepth 1 -type d)
# 去掉获取到目录名称前面的./
SUBDIRS := $(basename $(patsubst ./%, %, $(SUBDIRS)))
# 过滤指定目录
SUBDIRS := $(filter-out $(EXCLUDE_DIRS), $(SUBDIRS))

all:$(SUBDIRS)

$(SUBDIRS):ECHO
	make -C $@

ECHO:
	@echo $(SUBDIRS)

clean:
	@$(foreach N,$(SUBDIRS),make -C $(N) clean;)
